package com.pingan.haofang.searchcloud.api.matedata.constant;


import com.pingan.haofang.framework.common.functional.lang.control.base.annotation.Value;

import java.lang.reflect.Type;

/**
 * 索引字段类型枚举
 *
 * @author baojie371
 * @date 17/5/8
 * @since 1.0.0
 */
public enum MetadataFieldType {

    INT(1, "int", Integer.class, "整型", "整型字段"),

    LONG(3, "long", Long.class, "长整型", "长整型字段"),

    FLOAT(5, "float", Float.class, "浮点型", "浮点型字段"),

    DOUBLE(7, "double", Double.class, "Double型", "浮点型字段"),

    STRING(9, "string", String.class, "字符串类型", "字符串类型"),

    MY_IK(11, "my_ik", String.class, "分词字符", "按照内置房源分词器进行分词"),

    GEO(12, "location_rpt", String.class, "GEO空间地址", "地理位置空间查询"),

    TEXT_LIKE(13, "text_like", String.class, "like模糊查询", "like模糊查询");

//    DATE(14, "dateRange", String.class, "Date类型", "Date类型(yyyy-MM-ddTHH:mm:ss)");


    MetadataFieldType(int value, String fieldType, Type javaType, String typeName, String typeDescription) {
        this.value = value;
        this.fieldType = fieldType;
        this.javaType = javaType;
        this.typeName = typeName;
        this.typeDescription = typeDescription;
    }

    private int value;

    private String fieldType;

    private Type javaType;

    private String typeName;

    private String typeDescription;

    @Value
    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    @Value
    public String getFieldType() {
        return fieldType;
    }

    public void setFieldType(String fieldType) {
        this.fieldType = fieldType;
    }

    public Type getJavaType() {
        return javaType;
    }

    public void setJavaType(Type javaType) {
        this.javaType = javaType;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getTypeDescription() {
        return typeDescription;
    }

    public void setTypeDescription(String typeDescription) {
        this.typeDescription = typeDescription;
    }
}
